package com.zsrt.scott.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

import org.springframework.stereotype.Service;

import com.zsrt.scott.service.StudentService;
import com.zsrt.scott.student.StudentEntity;


@WebService(serviceName="StudentServiceWS",name="StudentService",portName="StudentServicePort")
@Service
public class StudentServiceImpl implements StudentService {
	
	private List<StudentEntity> studentList= new ArrayList<StudentEntity>();

	@Override
	@WebMethod(operationName="save")
	public void save(@WebParam(name="student") StudentEntity student) {
		System.out.println(student);
		studentList.add(student);
	}

	@Override
	public @WebResult(name="student") List<StudentEntity> findAll() {
		System.out.println(studentList);
		return studentList;
	}

}
